package com.dreamwhale.accelerator;

import com.dreamwhale.accelerator.configure.SessionInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;


@SuppressWarnings("deprecation")
@Configuration
public class SessionConfiguration extends WebMvcConfigurerAdapter {


	
	@Bean
	public SessionInterceptor sessionInterceptor() {
	    return new SessionInterceptor();
	}


	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(sessionInterceptor()).addPathPatterns("/**");
//		registry.addInterceptor(sessionInterceptor()).addPathPatterns("/login").
	}

}
